﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Views/Game/GameView.Master"%>
<%@ Import Namespace="Heritage.Codebox" %>
<%@ Import Namespace="Heritage" %>
<%@ Import Namespace="Heritage.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<% MessageModel model = ViewData.Model as MessageModel;
    %>
    <div>
    	<fieldset id="set1">

    <%
    foreach (GameMessages gm in model.Messages) {
        %>
        <div style="display:table-row">
        <%        
        if (Utils.MessageFlaggedByMe(gm.UID, Constants.FLAGGED_AS_INTERESTING))
        { %>
            <div style="color:#6B562C; font-weight:bold; display:table-cell">&radic;&nbsp;&nbsp;</div>
    <%  }
        else
        { %>
            <div style="color:Red; font-weight:bold; display:table-cell">&nbsp;</div>

    <%}
    %>
        <div style="display:table-cell"><a class="indicator" href="/Game/ShowMessage/?messageID=<%=gm.UID.ToString("N") %>&game=<%=gm.Game %>">[#]</a>&nbsp;</div><div style="display:table-cell"><a title=" :: <%=Utils.GetColoredMessage(gm.MessageText.Replace("\"",  "&quot;").Replace("\n","<br>").Replace("<b>", "").Replace("</b>", ""), true) %>" href="/Game/ShowMessage/?messageID=<%=gm.UID.ToString("N") %>&game=<%=gm.Game %>"><%=Utils.GetMessageSubjectColor(gm) %></a></div></div>
   <% }
%>
    </fieldset>
</div>
<div style="text-align:left">
<% if (model.AllPages > 0)
   { %>
<br /><b>Страницы:</b><br />
<%
    }
    for (int i = 0; i < model.AllPages; i++)
    { %>
        <a class="indicator" href="/Game/Messages/?page=<%=i %>&game=<%=model.GameID %>&filter="><b>[<%=(i+1) %>]</b></a>&nbsp;
   <% } %>
</div>
</asp:Content>
